<!doctype html>
<html lang="en">
<head>
    <title>wijtooltip-position</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="%description%" />
    <meta name="keywords" content="" />
    <meta name="author" content="ComponentOne" />

    <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />
    
    <link href="../../themes/wijmo/jquery.wijmo.wijtooltip.css" rel="stylesheet" type="text/css" />
    <script src="../../external/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="../../external/jquery-ui-1.9.1.custom.min.js" type="text/javascript"></script>
    <script src="../../external/jquery.mousewheel.min.js" type="text/javascript"></script>
    <script src="../../external/jquery.bgiframe-2.1.3-pre.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijutil.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijtooltip.js" type="text/javascript"></script>
    <script id="scriptInit" type="text/javascript">
        $(document).ready(function () {
            $("#tooltiptarget>a").wijtooltip({
                showCallOut: true,
                closeBehavior: 'sticky'
            });

        });
        function applyPosition() {
            $("#tooltiptarget>a").wijtooltip("option", "position", { my: $("#my1").get(0).value + " " + $("#my2").get(0).value, at: $("#at1").get(0).value + " " + $("#at2").get(0).value });
        };
    </script>
</head>
<body class="demo-single">
    <div class="container">
        <div class="header">
            <h2>
                wijtooltip-position</h2>
        </div>
        <div class="main demo">
            <!-- Begin demo markup -->
            <div id="tooltiptarget" class="ui-helper-reset ui-widget-header ui-corner-all" style="padding: 1em;">
                <a href="#" title="tooltip">tooltip</a>
            </div>
            <!-- End demo markup -->
            <div class="demo-options">
                <!-- Begin options markup -->
                <div style="height: 70px">
                    <div style="width: 180px; float: left;">
                        <span style="padding-right: 10px;">my:</span><select id="my1">
                            <option value="left">left</option>
                            <option value="center">center</option>
                            <option value="right">right</option>
                        </select>
                        <select id="my2">
                            <option value="top">top</option>
                            <option value="center">center</option>
                            <option value="bottom" selected="selected">bottom</option>
                        </select>
                        <br />
                        <span style="padding-right: 14px;">at:</span><select id="at1">
                            <option value="left">left</option>
                            <option value="center">center</option>
                            <option value="right" selected="selected">right</option>
                        </select>
                        <select id="at2">
                            <option value="top">top</option>
                            <option value="center">center</option>
                            <option value="bottom">bottom</option>
                        </select>
                    </div>
                </div>
                <input type="button" onclick="applyPosition();" value="apply" />
                <!-- End options markup -->
            </div>
        </div>
        <div class="footer demo-description">
            <p>
                This sample illustrates how to use the <b>position</b> option to change where the
                tooltip appears.</p>
            <p>
                Select a position in the drop-down lists and click the <b>apply</b> button. Then
                hover over <b>tooltip</b>.</p>
        </div>
    </div>
</body>
</html>
